﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class administrator_default : BLL.WebPageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(BLL.CmsBLL));
        if (!string.IsNullOrEmpty(Request.QueryString["mod"]))
        {
            loadusercontrol(Request.QueryString["mod"].ToString());
        }
        else
        {
            UserControl USDefaultUserControl = (UserControl)this.LoadControl("~/administrator/uc_admin/ucdefault.ascx");
            PlaceHolderAD.Controls.Add(USDefaultUserControl);
        }
    }
    private void loadusercontrol(string value)
    {
        try
        {
            UserControl usercontrol = (UserControl)this.LoadControl("~/administrator/uc_admin/" + value + ".ascx");
            PlaceHolderAD.Controls.Add(usercontrol);
        }
        catch (Exception ex)
        {
            ltMessageDefaultAdmin.Text = "<div style=\"padding:20px 0 0 50px; color:red; font-weight:bold; font-size:15px\">Load data failt! " + ex.Message.ToString() + "</div>";
        }
    }
}